\documentclass{beamer}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\usetheme{Warsaw}
\title[Code analysis]{Code analysis\\JMVA - JMT}
\author{Eli Gutin \texttt{eg08}, Mike Kwan \texttt{mk08}, John Wong \texttt{jw808}} 
\institute{Imperial College London}
\date{November 8, 2011}
\begin{document}

\begin{frame}
\titlepage
\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%
% Point we _must_ cover %
%%%%%%%%%%%%%%%%%%%%%%%%%
% a) describe the approach you took in trying to understand the codebase 
\begin{frame}{Our approach in understanding the code}
\begin{enumerate}
 \item{Reading the documentation, user manual and \texttt{javadoc}s.}
 \item{Using the struct 101 tool.}
 \item{Debugging in EclipseIDE and looking at stack traces.}
 \item{Navigating the code using \texttt{Ctrl} + click and looking at call hierarchy via \texttt{Ctrl+alt+h}}
\end{enumerate}
\end{frame}

% b) describe briefly what the application does and how you use it
\begin{frame}{What does the application do?}
JMVA
\begin{enumerate}
 \item{Uses an MVA algorithm to generate the Exact Solutions of a Model from a Queueing Network.}
 \item{What-if Analysis - Effectiveness of the input variables of a model to the output variables.}
 %for the component of a Model, JMVA requires..
 \item{Inputs : Classes, Stations and Service demands}
 \item{Outputs : Throughput, Queue Length, Residence Time, Utilization and System Power (Throughput/Response Time).}

\end{enumerate}
\end{frame}

% c) give an overview of the design/architecture of the application 
\begin{frame}{Design / Architecture}
 \includegraphics[scale=0.4]{Diagram1.png}
\end{frame}

\begin{frame}{Design / Architecture}
\begin{itemize}
 \item{\texttt{ExactWizard} is the graphical JMVA front-end which collects user input. Also has open/save functionality.}
 \item{Creates a shared XML file to invoke a \texttt{SolverDispatcher} via a \texttt{SolverClient} (which is only used by the UI because it needs to start a worker thread for the computation).}
 \item{Other front ends are the \texttt{JMVASolver} (command-line) and \texttt{CommandLineSolver} for batch tests.}
 \item{\texttt{SolverDispatcher} sends the task to the appropriate \texttt{Solver} from the \texttt{analytical} package. The solver then sets the results in the \texttt{ExactModel}.}
 \item{The \texttt{ExactModel} is passed around as a DTO and can be either displayed in the UI or serialized to XML.}
\end{itemize}

% Should put some diagrams here
\end{frame}

% d) which main features are implemented by which parts of the code?
\begin{frame}{Main features}
\begin{itemize}
 \item{Saving and opening of XML files is done with \texttt{XMLUtils}}
 \item{Rendering the graph is handled in \texttt{jmt.gui.exact.panels.GraphPanel} which uses a \texttt{jmt.gui.panels.WhatIfPlot}}
 \item{What if analysis logic is handled in the \texttt{SolverDispatcher}}
 \item{Randomizing the model is done inside the \texttt{ExactModel} itself}
 \item{Different types of solvers are implemented with subclasses of \texttt{Solver} and which one is invoked is determined by \texttt{SolverDispatcher}}
\end{itemize}

\end{frame}

\begin{frame}{Code quality evaluation}
\includegraphics[scale=0.6]{dependency1.png}
\end{frame}


% e) what is your opinion of the current design/code? (give specific examples)
\begin{frame}{Code quality evaluation}
\begin{block}{Testing}
\begin{itemize}
 \item{No unit tests?}
 \item{The test engine only does an end-to-end test comparing the simulation results from \texttt{JSIM} against the analytical ones from \texttt{JMVA}} 
 \item{Slow and expensive execution, low code coverage, brittle tests etc.}
\end{itemize}
\end{block}
\begin{block}{Cyclic dependencies}
\begin{itemize}
 \item{The \texttt{ExactModel} is in the GUI package which creates unusual dependencies from lower layers (solvers, XML serializer etc.)}
\end{itemize}
\end{block}
\end{frame}
\begin{frame}{Code quality evaluation}
\begin{block}{Positives}
\begin{itemize}
 \item{The observer pattern is used in the \texttt{SolverListener} which decouples the notifier and listener.} 
 \item{Worker thread for non-blocking UI}
\end{itemize}
\end{block}
\begin{block}{More deficiencies}
\begin{itemize} 
\item{Large classes}
\item{Dead code, hard-coded paths e.g. \texttt{D://prova.xml} }
\item{Non-intuitive naming (why \texttt{\emph{Exact}Wizard} and not \texttt{\emph{JMVA}Wizard}?).}
\end{itemize}
\end{block}
\end{frame}

% f) include anything else you think is interesting and relevant
\begin{frame}{Interesting and relevant facts}
\begin{itemize}
\item{Started in 2002 under \textit{Poletecnino di Milani}}
\item{Initial aim was to renovate WinModelling tools}
\item{In late 2006 became open-source and widely distributed}
\item{Students and practitioners alike contribute to it until now}
\end{itemize}
\end{frame}

%%%% Links %%%%%%%%%%%%%%
% http://jmt.sourceforge.net/Documentation.html
% http://jmt.sourceforge.net/Papers/Exercisebook080617.pdf %http://jmt.sourceforge.net/Papers/JMT_users_Manual.pdf

\end{document}